<template>
<div>
<el-container>
    <el-header>后台管理

       <div>
          欢迎VVVVIP用户：{{$store.getters.getUser.username}}
          <el-button @click="logout" type="danger" size="mini">退出登录</el-button>
       </div>

    </el-header>

  <el-container>
  <el-aside width="300px">
    <v-nav/>
  </el-aside>
    <el-main>
<router-view/>
</el-main>
  </el-container>
</el-container>
</div>
</template>

<script>
import vNav from '../../components/vNav'
export default {
  data () {
    return {

    }
  },
  components: {
    vNav
  },
  methods: {
    logout () {
      // 清空仓库内容
      this.$store.dispatch('changeUserInfo', false)
      // 跳转到登录
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="less" scoped>
  .el-header{
    width: 100%;
    height: 50px;
    background-color: pink;
  }

</style>
